package com.ml.mall.service.product;

import com.ml.mall.bean.page.Page;
import com.ml.mall.bean.req.BaseBeanReq;
import com.ml.mall.bean.req.product.*;
import com.ml.mall.bean.res.product.SysProductQueryOneRes;
import com.ml.mall.bean.res.product.SysProductQueryPageRes;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ml.mall.bean.res.product.SysProductQueryTreeRes;
import com.ml.mall.bean.res.product.SysProductShopPageRes;
import com.ml.mall.entity.product.SysProduct;

import java.util.List;

/**
* <p>
    *  服务类
    * </p>
*
* @author kyyang
* Created 2021-05-15
*/
public interface SysProductService extends IService<SysProduct> {

    /**
     * @description: 产品新增
     * @author kyyang
     * @date 2021/5/15 16:45
     * @version 1.0
     */
    Long sysProductNew(SysProductNewReq sysProductNewReq);

    /**
     * @description: 产品编辑
     * @author kyyang
     * @date 2021/5/15 17:56
     * @version 1.0
     */
    int sysProductEdit(SysProductEditReq sysProductEditReq);

    /**
     * @description: 产品删除
     * @author kyyang
     * @date 2021/5/15 17:59
     * @version 1.0
     */
    String sysProductDel(List<Long> ids);

    /**
     * @description: 查询产品详情
     * @author kyyang
     * @date 2021/5/15 18:11
     * @version 1.0
     */
    SysProductQueryOneRes sysProductByOne(BaseBeanReq baseBeanReq);

    /**
     * @description: 分页查询产品
     * @author kyyang
     * @date 2021/5/15 19:09
     * @version 1.0
     */
    Page<SysProductQueryPageRes> sysProductByPage(SysProductQueryPageReq sysProductQueryPageReq);

    /**
     * @description: 查询产品数
     * @author kyyang
     * @date 2021/5/22 15:25
     * @version 1.0
     */
    List<SysProductQueryTreeRes> sysProductQueryTree(SysProductQueryTreeReq sysProductQueryTreeReq);

    /**
     * @description: 产品搜索  TODO
     * @author kyyang
     * @date 2021/5/22 16:56
     * @version 1.0
     */
    Page<SysProductShopPageRes> sysProductQueryShopPage(SysProductShopPageReq sysProductShopPageReq);

    /**
     * @description: 根据产品ID 查询产品
     * @author kyyang
     * @date 2021/6/5 20:03
     * @version 1.0
     */
    SysProduct selectByProductId(Long productId);
}
